package com.study.design.model.behaviorPattern.mediator;

import java.util.HashMap;
import java.util.Map;

/**
* @Name: President
* @Description: 具体中介者对象:从具体同事类接收消息，并向对应同事对象发送命令
* @Author: 李超	lc_jack@foxmail.com
* @CreateDate: 2017-2-15 下午4:46:43 
* @Version: V1.0
 */
public class President implements Mediator {
	
	private Map<String, Department> map = new HashMap<String, Department>() ;

	@Override
	public void register(String dname, Department d) {
		map.put(dname, d) ;
	}

	@Override
	public void command(String dname) {
		map.get(dname).selfAction() ;
	}

}
